package top.truism.auth.permission;

import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface AuthorizeVerifyResolver {

  boolean handleLogin(HttpServletRequest request, HttpServletResponse response, MetaInfo metaInfo);

  boolean handleGroup(HttpServletRequest request, HttpServletResponse response, MetaInfo metaInfo);

  boolean handleAdmin(HttpServletRequest request, HttpServletResponse response, MetaInfo metaInfo);

  boolean handleNoyHandlerMethod(HttpServletRequest request, HttpServletResponse response, MetaInfo metaInfo);

  default void handlePostHandler(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) { };

  default void handleAfterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception e) {};

}
